"use strict";
var reg1 = new RegExp('zpd'); //let reg1:RegEXP = /zpd/
var reg2 = new RegExp('zpd', 'gi'); //g全局搜索 i忽略大小写   let reg2:RegEXP = /zpd/gi
var test = 'my name is zpd';
console.log(reg1);
var result = reg1.test(test);
console.log(result); //true
console.log(reg2.exec(test));
